<!--<include file="Public:header" />-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>奔跑吧！积分君！</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
    <meta content="telephone=no" name="format-detection">
    <link href="__ROOT__/App/Game/Static/css/nostop.css" rel="stylesheet" type="text/css" />
    <script src="http://mo2app.b0.upaiyun.com/cdn/jquery/jquery.2.0.min.js" type="text/javascript"></script>
    <script src="__ROOT__/App/Game/Static/js/Util.js" type="text/javascript"></script>
    <script src="__ROOT__/App/Game/Static/js/createjs.js" type="text/javascript"></script>
    <script src="__ROOT__/App/Game/Static/js/game.js" type="text/javascript"></script>
    <script src="__ROOT__/App/Game/Static/js/jquery.progress.js" type="text/javascript"></script>
    <script src="__ROOT__/App/Game/Static/js/NoStopCtrl.js?8896"></script>
    <script src="__ROOT__/App/Game/Static/js/iscroll.js"></script>
    <script charset="utf-8" type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script charset="utf-8" type="text/javascript" src="__ROOT__/App/Game/Static/js/share.js"></script>
    <style type="text/css">
    .c1{
        color: #FFF000
    }
    </style>
</head>
<body onload="init()">
<div id="gameStart">
    <img class="loadingShow" src="__ROOT__/App/Game/Static/images/lvdi-logo.png" />
    <div style="text-align:center">
    <svg id="container" style="margin-top: 60px;position: relative;z-index: 1;"></svg></div>
    <img class="loadingShow2" src="__ROOT__/App/Game/Static/images/bg-logo.png" />
</div>
<div id="GameScoreLayer" class="BBOX SHADE" style="display:none;">
    <img class="kickShare" src="__ROOT__/App/Game/Static/images/kick.png" />
    <div id="GameScoreLayer-text" style="font-size:18px"></div>
    <div id="GameOneImg" class="hide" style="width:90%;right:5%;position:absolute;top:25%;z-index:2">
        <img src="__ROOT__/App/Game/Static/images/game100.png" style="width:100%">
    </div>
    <img id="share-text" class="share-text"  src="__ROOT__/App/Game/Static/images/shareImg.png" />
    <img id="logoShow"  class="logoShow32" src="__ROOT__/App/Game/Static/images/bg-logo.png"/>
    <div  id="logoShow1" class="logoShow12 hide">
        <span>补全您的获奖信息</span>
        <div class="userInfo">
            <input id="userName" type="text" value='{$username}' maxlength="10" class="input_key"  placeholder="亲，请输入您的昵称~" />
            <input id="userPhone" type="tel"  value='{$mobile}' maxlength="11" class="input_key"  placeholder="请输入您的电话号码" />
            <div onclick="NoStopCtrl.jumpPage(5)" class="canceBtn">取消</div><div onclick="insertUserInfoShow()" class="submitBtn">提交</div>
        </div>
    </div>
    <div id="GameScoreLayer-btn">
        <img class="overBtn overBtn-left"  onclick="NoStopCtrl.replayBtn()" src="__ROOT__/App/Game/Static/images/again.png" />
        <img class="overBtn" onclick="NoStopCtrl.share()" src="__ROOT__/App/Game/Static/images/share.png" />
        <img class="overBtn overBtn-right" onclick="NoStopCtrl.jumpPage(4)" src="__ROOT__/App/Game/Static/images/gradeBtn.png" />
    </div>
</div>
<div id="stageShow" class="stageS1"></div>
<div id='scoreTotal'>
    <img src="__ROOT__/App/Game/Static/images/littleYa.png" id='titleBg'>
    <span id='number'>=&nbsp;<span id='score'>0步</span></span>
    <div id="GameTimeLayer"></div>
</div>
<div id="welcome" class="SHADE BOX-M" style="display:none;">
    <!-- 主页 -->
    <div class="welcome-bg FILL">
        <img src="__ROOT__/App/Game/Static/images/novipmain.png" />
        <div class="welcome-menu">
            <img src="__ROOT__/App/Game/Static/images/rule.png" onclick="NoStopCtrl.jumpPage(1,'{$jumpurl}')"/>
            <img id="ready-btn" jumpurl="{$jumpurl}" src="__ROOT__/App/Game/Static/images/letsgo.png" />
            <img src="__ROOT__/App/Game/Static/images/grade.png" onclick="NoStopCtrl.jumpPage(4,'{$jumpurl}')"/>
        </div>
    </div>
</div>
<div id='timeOver' class="hide"></div>
<div id="share-wx"></div>
<!-- 获奖攻略 -->
<div id="prizesSoup" class="prizesSoup">
    <if condition="$is_member eq 1">
        <div class="prizes-title">会员获奖攻略<span class="s_grade" onclick="NoStopCtrl.jumpPage(7)">奔跑积分</span></div>
        <div class="prizes-content">
            <div style="width:90%;text-align:left;padding-top: 0%;">
                <!--                 <h5><b>30</b>秒时间，</h5>
                                <h5>你能走多远？</h5>
                                <h5>点击脚印即算一步，</h5>
                                <h5>碰到障碍要绕过哦！</h5>
                                <h5>听说高手都能走<b>100</b>步以上，</h5>
                                <h5>不信，你玩~</h5>
                                <h5>如果你的战绩榜上有名（前15名），有好礼哦~</h5> -->
                <h5><b>每周五都会更新名次噢！</b></h5>
                <h5>周冠军：<span class="c1">2万</span>积分</h5>
                <h5>周亚军：<span class="c1">1万</span>积分</h5>
                <h5>周季军：<span class="c1">5千</span>积分</h5><br>
                <h5>活动时间是10月16日-10月29日</h5><br>
                <h5><b>掌握技巧，事半功倍，不要说我没告诉你哟！</b></h5>
                <h5>1.<span class="c1">左右手</span>同时开攻，<span class="c1">两大拇指</span>连贯进行</h5>
                <h5>2.瞄准小脚印，不要碰到障碍物哟，<span class="c1">石头-5S，图钉-5s</span></h5>
                <h5>3.遇到以下道具，可尽情的点，<span class="c1">爱心石头+5s，小强+5步</span></h5>
                <h5>4.<span class="c1">脚印不能跳过</span>，发现无法前行，立马<span class="c1">回头检查</span>是否漏点脚印。</h5>
                <h5>5.一次不顺利，再来一次，熟能生巧。</h5>
            </div>
        </div>
    <else />
        <div class="prizes-title ">非会员获奖攻略</div>
        <div class="prizes-content">
            <div style="width:90%;text-align:left;padding-top: 9%;">

                <h5>非会员获奖攻略</h5>
                <h5>非会员获奖攻略</h5>
                <h5>非会员获奖攻略</h5>
                <h5>非会员获奖攻略</h5>
            </div>
        </div>
    </if>


    <img class="prizes-btn btn-left"  onclick="NoStopCtrl.jumpPage(2)" src="__ROOT__/App/Game/Static/images/back.png" />
    <img id="game-start"  onclick="NoStopCtrl.jumpPage(3,'{$jumpurl}')" class="prizes-btn btn-right" src="__ROOT__/App/Game/Static/images/againblack.png" />
</div>
<!--排行榜 -->
<div id="gradeList" class="prizesSoup" >
    <div class="grade-title">排&nbsp;行&nbsp;榜<if condition="$is_member eq 1"><span class="s_grade" onclick="NoStopCtrl.jumpPage(7)">奔跑积分</span></if></div>
    <div class="grade-content">
        <section>
            <ul>
                <li>
                    <span>排名</span>
                    <span>会员昵称</span>
                    <span>步数</span>
                    <span>时间</span>
                </li>
            </ul>
            <div id="userListIscroll" class="ranks_content">
                <div class="userListSilder">
                    <ul class="content" >
                        <!--<li>
                            <span>1</span>
                            <span>汤圣灵</span>
                            <span>200</span>
                        </li>-->
                    </ul>
                </div>
            </div>
        </section>
    </div>
    <img class="prizes-btn btn-left"  onclick="NoStopCtrl.jumpPage(2)" src="__ROOT__/App/Game/Static/images/back.png" />
    <img id="game-start"  onclick="NoStopCtrl.jumpPage(3,'{$jumpurl}')" class="prizes-btn btn-right" src="__ROOT__/App/Game/Static/images/againblack.png" />
</div>
<!--我的积分 -->
<div id="myGrade" class="prizesSoup" >
    <div class="grade-title">奔跑积分</div>
    <div class="grade-content grade-content2">
        <section>
            <ul>
                <li>
                    <span>序号</span>
                    <span>时间</span>
                    <span>积分</span>
                </li>
            </ul>
            <div id="userListIscroll2" class="ranks_content2">
                <div class="userListSilder">
                    <ul class="content" >
                        <!--<li>
                            <span>1</span>
                            <span>2015-09-10</span>
                            <span>100</span>
                        </li>-->
                    </ul>
                </div>
            </div>
        </section>
    </div>
    <img class="prizes-btn btn-left"  onclick="NoStopCtrl.jumpPage(2)" src="__ROOT__/App/Game/Static/images/back.png" />
    <img id="game-start"   onclick="NoStopCtrl.jumpPage(3,'{$jumpurl}')" class="prizes-btn btn-right" src="__ROOT__/App/Game/Static/images/restartblack.png" />
</div>
<!-- 游戏进入显示说明 -->
<div class="cover" onclick="$(this).hide()" style="display:none">
    <div>
        <h5><b>30</b>秒时间，</h5>
        <h5>你能走多远？</h5>
        <h5>点击脚印即算一步，</h5>
        <h5>碰到障碍要绕过哦！</h5>
        <h5>听说高手都能走<b>100</b>步以上，</h5>
        <h5>不信，你玩~</h5>
    </div>
</div>
<div class="word hide"></div>
</body>
<script type="text/javascript">
var progress = $("#container").Progress({
    percent: 100,
    width: 180,
    height: 15,
    fontSize: 12
});

    var url= "{:u('Index/ajaxAddUserinfo')}";
    var url1="{:u('Index/ajaxAddScore')}";
    var url2="{:u('Index/ajaxGetRank')}";
    var url3="{:u('Index/ajaxGetMyRank')}";
    var infos = "";
    //游戏进入显示说明缓存
    // function GetCookie(Name) {
    //     var search = Name + "="
    //     var Cookie = document.cookie;
    //     if (Cookie.length <= 0) return "";// cookie 不存在,返回空值
    //     if (Cookie.indexOf(search) == -1) return "";// 'visited' 不存在,返回空值
    //     start = Cookie.indexOf(search) + search.length//"visited=yes"起始位置索引值
    //     end = Cookie.indexOf(";", start);//"visited=yes"终止位置索引值
    //     if (end == -1);//";"不存在
    //     end = Cookie.length;
    //     return unescape(Cookie.substring(start, end))
    // }
    // function SetCookie() {
    //     if (GetCookie('visited') == '') {
    //         document.cookie = "visited=yes"
    //     }
    //     else {
    //         $(".cover").hide();
    //     }
    // }
    // SetCookie();
    //填写姓名电话
    function insertUserInfoShow() {
        var userName = $.trim($("#userName").val());
        var phone = $.trim($("#userPhone").val());
        if (userName == "") {
            Util.info("请输入您的姓名！");
            return;
        }

        if (!Util.isMobile(phone)) {
            Util.info("请输入正确的电话号码！");
            return;
        }
        $.ajax({
            method: "GET",
            dataType:"json",
            data: {
                'username':userName,
                'mobile':phone
            },
            url:url,
            success: function (data) {
                if(data>0){
                    NoStopCtrl.jumpPage(4);
                }else{
                    Util.info("请重试");
                }
            }
        });
    }

    function weixinShare(configArr,shareArr){
        wx.config({
            // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            debug: false,
            appId: configArr.appId,
            timestamp: configArr.timestamp,
            nonceStr:  configArr.nonceStr,
            signature: configArr.signature,
            jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','showOptionMenu','chooseImage', 'uploadImage', 'downloadImage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });

        wx.ready(function () {
            wx.hideMenuItems({
                menuList: ['menuItem:originPage', 'menuItem:openWithQQBrowser', 'menuItem:share:qq', 'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:readMode', 'menuItem:refresh'] // 要隐藏的菜单项，所有menu项见附录3
            });
            wx.showOptionMenu();
            var shareData = {
                title:  shareArr.title,
                desc:    shareArr.desc,
                link:    shareArr.link,
                imgUrl:  shareArr.imgUrl,
                success:function(res){

                    /*$.getJSON('/ldh/vote.php/Index/sharelog',{acid:shareArr.acid}  ,function(json){

                    })*/
                }
            };

            wx.onMenuShareTimeline(shareData);
            wx.onMenuShareAppMessage(shareData);

            // config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
        });
        wx.error(function (res) {

        });
    }

    weixinShare({$signPackage},{$sharePackage});

</script>
</html>